package com.taotao.health.controller;


import com.taotao.common.core.domain.Result;

import com.taotao.health.domain.vo.DoctorCreationsVO;
import com.taotao.health.domain.vo.DoctorsPatientVO;
import com.taotao.health.service.CreateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("consultation")
public class ConsultationController {


    @Autowired
    private CreateService createService;

    /**
     * 查询医生手下的患者信息
     * @return
     */
    @GetMapping("selectDoctorPatient")
    public List<DoctorsPatientVO> selectDoctorPatient(){
        List<DoctorsPatientVO> doctorsPatientVOS = createService.selectDoctorPatient();
        return doctorsPatientVOS;
    }

    /**
     * 修改医生接诊状态
     * @param id
     * @return
     */
    @RequestMapping("updateDoctorConsultationStatus")
    public Result updateDoctorConsultationStatus(Integer id){
        return createService.updateDoctorConsultationStatus(id);
    }

    /**
     * 更改医生退珍状态
     * @param id
     * @param reason
     * @return
     */
    @RequestMapping("updateDoctorConsultationReason")
    public Result updateDoctorConsultationReason(Integer id,Integer reason){
        return createService.updateDoctorConsultationReason(id,reason);
    }

}
